home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / BUS / TMCM Software and Labs.sit / Software for TMCM 7_95 / Files for Lab 14 / NestedSquares-3D < prev    next >
Text File  |  1995-03-11  |  1KB  |  50 lines

  1. ; shows an animation of squares of different sizes spinning
  2. ; inside one another.
  3.  
  4. animate 60
  5.  
  6.  
  7. ; First, define "square1" to be a small square with two
  8. ; attached lines sticking out to the left and right.
  9. define square1 [ 
  10.    line xtranslate 1
  11.    line xtranslate -1
  12.    square ]
  13.  
  14. ; Second, define square2 to be a larger square with two
  15. ; attached lines, PLUS a rotating version of square1 nested
  16. ; inside
  17. define square2 [
  18.     square1 xrotate 0:900 zrotate 90
  19.     square scale 3
  20.     line xtranslate 2
  21.     line xtranslate -2 ]
  22.  
  23. ; Third, define square3 to be a larger square with two
  24. ; attached lines, PLUS a rotating version of square2 nested
  25. ; inside
  26. define square3 [
  27.     square2 xrotate 0:720 zrotate 90
  28.     square scale 5
  29.     line xtranslate 3
  30.     line xtranslate -3 ]
  31.  
  32. ; Fourth, define square4 to be a larger square with two
  33. ; attached lines, PLUS a rotating version of square3 nested
  34. ; inside
  35. define square4 [
  36.     square3 xrotate 0:540 zrotate 90
  37.     square scale 7
  38.     line xtranslate 4
  39.     line xtranslate -4 ]
  40.  
  41. ; Fifth, define square5 to be a larger square with two
  42. ; attached lines, PLUS a rotating version of square4 nested
  43. ; inside
  44. define square5 [
  45.     square4 xrotate 0:360 zrotate 90
  46.     square scale 9 ]
  47.  
  48. ; Display a square 5, and make it rotate as well
  49. square5 xrotate 0:180 zrotate 90
  50.